package com.fyy.absfactory;

import com.fyy.absfactory.color.BlueColor;
import com.fyy.absfactory.color.Color;
import com.fyy.absfactory.color.GreeColor;
import com.fyy.absfactory.color.RedColor;
import com.fyy.absfactory.shape.Shape;

/**
 * @Author fyy
 * @Description
 * @Date 2020/7/23 9:52
 */
public class ColorFactory extends AbstractFactory{

    @Override
    public Shape getShape(String shape) {
        return null;
    }

    public Color getColor(String color){
        if(null == color){
            return null;
        }
        switch (color){
            case "RED":
                return new RedColor();
            case "GREE":
                return new GreeColor();
            case "BLUE":
                return new BlueColor();
        }
        return null;
    }

}
